﻿#ifndef SUBMENU_H
#define SUBMENU_H

#include <QObject>

class SubMenu : public QObject
{
    Q_OBJECT
    Q_PROPERTY(bool wifi READ wifi WRITE setWifi NOTIFY wifiChanged)
    Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged)
    Q_PROPERTY(bool btnCheck READ btnCheck WRITE setBtnCheck NOTIFY btnCheckChanged)
    Q_PROPERTY(int comboboxIndex READ comboboxIndex WRITE setComboboxIndex NOTIFY comboboxIndexChanged)



    bool m_wifi = false;

    QString m_path;

    bool m_btnCheck = false;

    int m_comboboxIndex = 0;

public:
    explicit SubMenu(QObject *parent = nullptr);

    SubMenu(const SubMenu &obj){
        m_wifi = obj.m_wifi;
    }
    SubMenu &operator=(const SubMenu &obj){
        m_wifi = obj.m_wifi;
        return *this;
    }
    bool wifi() const;
    void setWifi(bool newWifi);

    const QString &path() const;
    void setPath(const QString &newPath);

    bool btnCheck() const;
    void setBtnCheck(bool newBtnCheck);

    int comboboxIndex() const;
    void setComboboxIndex(int newComboboxIndex);

signals:

    void wifiChanged();
    void pathChanged();
    void btnCheckChanged();
    void comboboxIndexChanged();
};
Q_DECLARE_METATYPE(SubMenu)

#endif // SUBMENU_H
